% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode

% This is a simple template for a LaTeX document using the "article" class.
% See "book", "report", "letter" for other types of document.

\documentclass[11pt]{ctexart} % use larger type; default would be 10pt

\usepackage[utf8]{inputenc} % set input encoding (not needed with XeLaTeX)

%%% Examples of Article customizations
% These packages are optional, depending whether you want the features they provide.
% See the LaTeX Companion or other references for full information.

%%% PAGE DIMENSIONS
\usepackage{geometry} % to change the page dimensions
\geometry{a4paper} % or letterpaper (US) or a5paper or....
%\geometry{margin=1cm} % for example, change the margins to 2 inches all round
% \geometry{landscape} % set up the page for landscape
%   read geometry.pdf for detailed page layout information

\usepackage{graphicx} % support the \includegraphics command and options

% \usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent

%%% PACKAGES
\usepackage{booktabs} % for much better looking tables
\usepackage{array} % for better arrays (eg matrices) in maths
\usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)
\usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim
\usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float
\usepackage{amsmath}

% These packages are all incorporated in the memoir class to one degree or another...

%%% HEADERS & FOOTERS
\usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
\pagestyle{fancy} % options: empty , plain , fancy
\renewcommand{\headrulewidth}{0pt} % customise the layout...
\lhead{}\chead{}\rhead{}
\lfoot{}\cfoot{\thepage}\rfoot{}

%%% SECTION TITLE APPEARANCE
\usepackage{sectsty}
\allsectionsfont{\sffamily\mdseries\upshape} % (See the fntguide.pdf for font help)
% (This matches ConTeXt defaults)

%%% ToC (table of contents) APPEARANCE
\usepackage[nottoc,notlof,notlot]{tocbibind} % Put the bibliography in the ToC
\usepackage[titles,subfigure]{tocloft} % Alter the style of the Table of Contents
\renewcommand{\cftsecfont}{\rmfamily\mdseries\upshape}
\renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape} % No bold!

%%% END Article customizations

%%% The "real" document content comes below...

\title{考虑直流母线电压动态的阻抗建模--利用符号计算}
\author{陈亮}
%\date{} % Activate to display a given date or no date (if empty),
         % otherwise the current date is printed 

\begin{document}
\maketitle

\section{直流母线建模}

逆变器系统的框图如图所示
\begin{figure}[ht]
\centering
\includegraphics[scale=0.8]{system-lcr-block.jpg}
\caption{并网逆变器系统框图}
\end{figure}

而直流母线电压建模分为两部分，一部分是直流母线的模型；一部分是关于直流母线电压的控制器。
\emph{
在推导小信号阻抗模型的直流母线电压部分时，可以认为锁相环理想。这是根据小信号阻抗模型可以被建模成线性模型，并使用叠加定理得到的结论。}

\subsection{直流母线模型}

\subsubsection{直流母线模型小信号模型}

直流母线的模型，就是直流侧输入功率-直流侧内阻损耗-直流侧电容充电功率=直流测输出功率=交流侧输出功率。
直流侧输出功率为：
\begin{equation}
P_{dc}={I_{load}}{v_{dc}} - v_{dc}^2/{Z_{dcn}} - \frac{{\mathrm{d} {C_{dc}}v_{dc}^2}}{{2\mathrm{dt} }}
\end{equation}
交流侧输出功率为：
\begin{equation}
P_{ac}=u_{abc}i_{abc}
\end{equation}

直流侧输出功率的小信号模型为：
\begin{equation}
\Delta P_{dc} = (I_{load}-\frac{2v_{dc0}}{Z_{dcn}}-sC_{dc}v_{dc0})\Delta v_{dc}
\end{equation}

交流侧输出功率的小信号模型为：
\begin{equation}
\Delta P_{ac} = \Delta u_{abc} i_{abc0}+\Delta i_{abc} u_{abc0}
\label{eq:ac_power_small_signal}
\end{equation}

\emph{这里的问题是如何处理$\Delta u_{abc}$}，可以选择在这里就把$\Delta u_{abc}$用$\Delta v_{abc}$和$\Delta i_{abc}$消去，利用交流侧的滤波器模型：

\begin{equation}
u_{abc} = L_1(s) i_{abc}+K_f(s) v_{abc}
\label{eq:ac_filter_plant}
\end{equation}

也可以暂不消去，即先不利用交流侧滤波器模型方程，而先从控制器出发，建立$\Delta u_{abc}$和($\Delta v_{abc}$,$\Delta i_{abc}$)之间的关系。

这里先采用第一种思路，即用式.\ref{eq:ac_filter_plant}先消掉式.\ref{eq:ac_power_small_signal}中的$\Delta u_{abc}$，得
\begin{equation}
\Delta P_{ac} = \Delta(K_f(s)v_{abc}i_{abc})+\Delta(L_1(s)i_{abc}i_{abc})
\label{eq:ac_power_small_signal_sim1}
\end{equation}

\emph{这里需要对记号特别注意，式.\ref{eq:ac_power_small_signal_sim1}中的$\Delta K_f(s)$和$\Delta L_1$是多项式算子，也就是说
\begin{equation}
L_1(s)i_{abc}i_{abc}\ne L_1(s)i_{abc}^2
\end{equation}
}
下面就是建立$v_{dc}$和($\Delta v_{abc}$,$\Delta i_{abc}$)的关系。
由于式.\ref{eq:ac_power_small_signal_sim1}中的稳态工作点为基频交流分量，所以采用HTM的方式进行推导。


\subsubsection{直流母线模型小信号HTM模型}

以上标$\tilde{}$表示频谱矢量。把频谱矢量的中心定在直流频带上，即$v_{dc}$的稳态值和扰动值都放在中心频带。即
\begin{equation}
\tilde{v_{dc}}=
\begin{bmatrix} 0 \\ v_{dc0}+\Delta v_{dc} \\ 0
\end{bmatrix}
\end{equation}

至于为什么只选择长度为3的列向量，是因为直流母线电压闭环系统的带宽较小。这和锁相环是类似的。例如，当PCC电压$v_{abc}$受到频率为$f_p$的扰动，则电流$i_{abc}$会产生频率为$f_p$的响应。如果从($\Delta v_{abc}$,$\Delta i_{abc}$)到$\Delta v_{dc}$的传递函数带宽很小($\ll 2f_1$)，则3行频谱矢量覆盖的频段$[-f_1-f_p,f_1+f_p]$之外的响应可以忽略不计。这一点会在以后的版本，根据阻抗曲线进行说明。

用HTM方式展开交流侧功率，$\Delta \tilde P_{ac} = \Delta(\tilde K_f(s)\tilde v_{abc} \tilde i_{abc}) +\Delta(L_1(s) i_{abc})i_{abc}) $

\begin{align}
\Delta(\tilde K_f(s)\tilde v_{abc} \tilde i_{abc}) 
&= \begin{bmatrix}\tilde i_{a0}  & \tilde i_{b0}  & \tilde i_{c0} \end{bmatrix}
\tilde K_f(s)
\begin{bmatrix} \Delta \tilde v_a \\  \Delta \tilde v_b \\ \Delta \tilde v_c  \end{bmatrix}
+
 K_f(f_1) \begin{bmatrix}\tilde u_{a0}  & \tilde u_{b0}  & \tilde u_{c0} \end{bmatrix}
\begin{bmatrix} \Delta \tilde i_a \\  \Delta \tilde i_b \\ \Delta \tilde i_c  \end{bmatrix}
\end{align}

其中$\tilde{i_{a0}}$为
\begin{equation}
\tilde{i_{a0}} = 
\frac{1}{2}
\begin{bmatrix}
0 & I_1^* & 0 \\
I_1 & 0 & I_1^* \\
0 & I_1 &  0
\end{bmatrix}
\end{equation}
%
$I_1$为输出电流的稳态相峰值。
$ \Delta \tilde i_a $为
\begin{equation}
\Delta \tilde i_a = 
\begin{bmatrix}
\Delta i_a^* \\ 0 \\ \Delta i_a
\end{bmatrix}
\end{equation}
%
$\tilde K_f(s)$为
\begin{equation}
\tilde K_f(s) = 
\begin{bmatrix}
K_f(s-j\omega_1) & & \\
& K_f(s) & \\
& & K_f(s+j\omega_1)
\end{bmatrix}
\end{equation}
其余项，如BC相变量的HTM形式可以类似得出。

\begin{equation}
\Delta(L_1(s) i_{abc})i_{abc})
= \begin{bmatrix}\tilde i_{a0} & \tilde i_{b0} & \tilde i_{c0}\end{bmatrix}
\tilde L_1(s)
\begin{bmatrix} \Delta \tilde i_a \\  \Delta \tilde i_b \\ \Delta \tilde i_c  \end{bmatrix}
+
L_1(f_1) \begin{bmatrix}\tilde i_{a0} & \tilde i_{b0} & \tilde i_{c0}\end{bmatrix}
\begin{bmatrix} \Delta \tilde i_a \\  \Delta \tilde i_b \\ \Delta \tilde i_c  \end{bmatrix}
\end{equation}
其中变量具体的矩阵展开形式同上。

用HTM展开直流侧功率

\begin{equation}
\Delta \tilde P_{dc} = (I_{load}-2\frac{v_{dc0}}{Z_{dcn}}-C_{dc} v_{dc0}\tilde s) \Delta \tilde v_{dc}
\end{equation}
其中变量具体的矩阵展开形式同上。

因为交流侧功率等于直流侧功率，解得(带入正负序变换)
\begin{equation}
\Delta \tilde  v_{dc} = \tilde C_{i} \Delta \tilde i_a+\tilde C_{v} \Delta \tilde v_a
\label{eq:vdc_htm}
\end{equation}

其中$\tilde C_{i} $和$\tilde C_{v}$的表达式可以由符号计算给出。同时$\tilde C_{i}$和$\tilde C_{v}$代表了直流母线电压对于输出电流和PCC电压的开环响应，有明确的物理意义，所以它们可以作为符号计算过程中的中间变量。

\subsubsection{直流母线电压控制器小信号模型及其HTM形式}

根据控制框图，d轴电流用于稳定直流母线电压，可得

\begin{equation}
\Delta i_{dr} = H_v \Delta v_{dc}
\end{equation}

将$\Delta i_{dr}$和输出A相占空比$\Delta m_{a}$关联起来。

\begin{equation}
\Delta m_{a} = \cos(\theta_1) H_{id} \Delta i_{dr}
\end{equation}

将上两式合并，并展开成HTM形式
\begin{equation}
\Delta \tilde m_{a} = 
\begin{bmatrix}
& \frac12 & \\
\frac12 & &\frac12 \\
& \frac12 &
\end{bmatrix}
\tilde H_{id} \tilde H_v
\tilde \Delta i_{dr}
\end{equation}

\subsection{直流母线电压动态影响对于小信号阻抗模型的影响}

逆变器端口电压$u_a$和控制器输出占空比$m_a$的关系为
%
\begin{equation}
u_a = K_m v_{dc} m_a
\end{equation}

其中$K_m$是系统延时除以调制系数，对于SPWM调制方式而言，$K_m=\frac{1}{2v_{dc0}}e^{-1.5T_s}$。其中$T_s$为开关周期。


线性化上式，得
\begin{equation}
\Delta u_a = K_m (M_1 \Delta v_{dc}+v_{dc0} \Delta m_a)
\end{equation}

其中$\Delta m_a$中由d轴电流指令产生的扰动和$v_{dc}$有关，其余的部分则是外环（直流母线电压环）理想情况下，输出占空比对于输出电流$\Delta i_a$的响应。所以整理上式，将$\Delta v_{dc}$项提取出来，写成
\begin{equation}
\Delta u_a = F\Delta v_{dc}+H \Delta i_a
\label{eq:addition_vdc}
\end{equation}
%
\begin{equation}
F =  K_m (M_1+v_{dc0}\cos(\theta_1) H_{id} \Delta i_{dr})
\end{equation}
其中$F$代表逆变器输出电压对于直流母线电压扰动的开环响应，而$H$代表外环理想情况下，逆变器输出对于电流反馈的开环响应。
它们的表达式，及其HTM形式可以由符号运算给出。

\subsection{在原有模型中再加入锁相环部分}

考虑锁相环动态导致的PCC电压定向同步旋转坐标系和控制用PLL坐标系之间的角度差。
此角度差$\Delta \theta_{pll}$由锁相环的闭环传递函数给出

\begin{equation}
\Delta \theta_{pll} = T_{pll}(s)\Delta v_q
\end{equation}

对小信号阻抗模型的影响

\begin{align}
\Delta i_{d}^p &= I_q \Delta \theta_{pll}+\Delta i_{d} \\
\Delta i_{q}^p &= -I_d \Delta \theta_{pll}+\Delta i_{q}
\end{align}
\begin{align}
\Delta m_{d}^p &= -M_q \Delta \theta_{pll}+\Delta m_{d}\\
\Delta m_{q}^p &= M_d \Delta \theta_{pll}+\Delta m_{q}
\end{align}


进行整理后发现，锁相环对于模型的影响在于，输出占空比中，在原来外环理想（锁相环）理想的情况下，叠加了由于锁相环动态影响导致的电压扰动分量，即

\begin{equation}
\Delta u_a = S\Delta v_{a}+H \Delta i_a
\label{eq:addition_pll}
\end{equation}

合并式\ref{eq:addition_vdc}和式\ref{eq:addition_pll}，可以得到即考虑直流母线电压动态响应，又考虑锁相环动态响应的逆变器输出电压表达式，将其转换成HTM形式为

\begin{equation}
\Delta \tilde u_a =  F \Delta \tilde v_{dc}+S\Delta \tilde v_{a}+H \Delta \tilde i_a
\label{eq:addition_vdc_pll}
\end{equation}



\section{符号计算框架}

根据式\ref{eq:vdc_htm}和式\ref{eq:addition_pll}可以得到如下计算阻抗矩阵的框图

\begin{figure}[ht]
\centering
\includegraphics[scale=1.5]{symbol_whole_block.jpg}
\caption{逆变器阻抗模型的框图表示}
\end{figure}

化简上图可得
%
\begin{equation}
(I+\tilde G (\tilde H+\tilde F C_{i}) )^{-1}\tilde G (\tilde K_f -\tilde S -\tilde F \tilde C_{v})\tilde v_a =
 \tilde i_a
\end{equation}

不考虑逆变器滤波器可能存在的三相不对称性，$G$为对角阵，则上式可以写成
\begin{equation}
(\tilde K_f -\tilde S -\tilde F \tilde C_{v})\tilde v_a =
(\tilde G^{-1}+ (\tilde H+\tilde F C_{i}) ) \tilde i_a
\end{equation}
%
上式个矩阵的计算和化简可以由符号计算得到。


\subsection{符号计算结果}
先给出用中间变量表示的符号计算阻抗形式，写成下式：

\begin{align}
&\left( {\begin{array}{*{20}{c}}
  {{K_{f,sn1}} - {S_{11}} - {C_v}_{21}{\mkern 1mu} {F_{12}}}&0&{ - {S_{13}} - {C_v}_{23}{\mkern 1mu} {F_{12}}} \\ 
  0&{{K_{f,s0}}}&0 \\ 
  { - {S_{31}} - {C_v}_{21}{\mkern 1mu} {F_{32}}}&0&{{K_{f,s1}} - {S_{33}} - {C_v}_{23}{\mkern 1mu} {F_{32}}} 
\end{array}} \right)\left( {\begin{array}{*{20}{c}}
  {\Delta \tilde v_a^*} \\ 
  0 \\ 
  {\Delta {{\tilde v}_a}} 
\end{array}} \right) \notag \\
%
=&\left( {\begin{array}{*{20}{c}}
  {{H_{11}} - {L_{1,sn1}} + {C_i}_{21}{\mkern 1mu} {F_{12}}}&0&{{C_i}_{23}{\mkern 1mu} {F_{12}}} \\ 
  0&{{H_{22}} - {L_{1,s0}}}&0 \\ 
  {{C_i}_{21}{\mkern 1mu} {F_{32}}}&0&{{H_{33}} - {L_{1,s1}} + {C_i}_{23}{\mkern 1mu} {F_{32}}} 
\end{array}} \right)\left( {\begin{array}{*{20}{c}}
  {\Delta \tilde i_a^*} \\ 
  0 \\ 
  {\Delta v{{\tilde i}_a}} 
\end{array}} \right)
\end{align}

中间变量的具体表达形式如下
\footnote{其中上划线表示共轭，在目前版本中这个符号还没有被修改}
\footnote{其中下标st表示传递函数的稳态值，即其在基频的值}
\footnote{$\tilde S$的表达式较长，这是因为现在的符号计算框架没有办法自动将dq轴的稳分量合并成一个复数。所以，它的展示方式做了点变化；没有显示的元素为0
}
 
 
%
\begin{equation}
\tilde F = 
\left( {\begin{array}{*{20}{c}}
  0&{{K_{m,sn1}}{\mkern 1mu} \left( {\frac{{\overline {{M_{1a}}} }}{2} + \frac{{{H_{i,s0}}{\mkern 1mu} {H_{v,s0}}{\mkern 1mu} {V_{dc0}}}}{2}} \right)}&0 \\ 
  {{K_{m,s0}}{\mkern 1mu} \left( {\frac{{{M_{1a}}}}{2} + \frac{{{H_{i,sn1}}{\mkern 1mu} {H_{v,sn1}}{\mkern 1mu} {V_{dc0}}}}{2}} \right)}&0&{{K_{m,s0}}{\mkern 1mu} \left( {\frac{{\overline {{M_{1a}}} }}{2} + \frac{{{H_{i,s1}}{\mkern 1mu} {H_{v,s1}}{\mkern 1mu} {V_{dc0}}}}{2}} \right)} \\ 
  0&{{K_{m,s1}}{\mkern 1mu} \left( {\frac{{{M_{1a}}}}{2} + \frac{{{H_{i,s0}}{\mkern 1mu} {H_{v,s0}}{\mkern 1mu} {V_{dc0}}}}{2}} \right)}&0 
\end{array}} \right)
\end{equation}
 
\begin{equation}
\tilde C_v = 
\left( {\begin{array}{*{20}{c}}
  0&0&0 \\ 
  { - \frac{{3{\mkern 1mu} {I_{1a}}{\mkern 1mu} {K_{f,sn1}}{\mkern 1mu} {Z_{dcn,sn1}}}}{{4{\mkern 1mu} {V_{dc0}} - 2{\mkern 1mu} {I_{load}}{\mkern 1mu} {Z_{dcn,sn1}} + 2{\mkern 1mu} {C_{dc,sn1}}{\mkern 1mu} {V_{dc0}}{\mkern 1mu} {Z_{dcn,sn1}}}}}&0&{ - \frac{{3{\mkern 1mu} {K_{f,s1}}{\mkern 1mu} {Z_{dcn,s1}}{\mkern 1mu} \overline {{I_{1a}}} }}{{4{\mkern 1mu} {V_{dc0}} - 2{\mkern 1mu} {I_{load}}{\mkern 1mu} {Z_{dcn,s1}} + 2{\mkern 1mu} {C_{dc,s1}}{\mkern 1mu} {V_{dc0}}{\mkern 1mu} {Z_{dcn,s1}}}}} \\ 
  0&0&0 
\end{array}} \right)
\end{equation}
 

\begin{equation}
\tilde C_i = 
\left( {\begin{array}{*{20}{c}}
  0&0&0 \\ 
  { - \frac{{3{\mkern 1mu} {Z_{dcn,sn1}}{\mkern 1mu} \left( {{I_{1a}}{\mkern 1mu} {L_{1,sn1}} + {I_{1a}}{\mkern 1mu} {L_{1st}} + {K_{fst}}{\mkern 1mu} {U_{1a}}} \right)}}{{2{\mkern 1mu} \left( {2{\mkern 1mu} {V_{dc0}} - {I_{load}}{\mkern 1mu} {Z_{dcn,sn1}} + {C_{dc,sn1}}{\mkern 1mu} {V_{dc0}}{\mkern 1mu} {Z_{dcn,sn1}}} \right)}}}&0&{ - \frac{{3{\mkern 1mu} {Z_{dcn,s1}}{\mkern 1mu} \left( {{L_{1,s1}}{\mkern 1mu} \overline {{I_{1a}}}  + {L_{1st}}{\mkern 1mu} \overline {{I_{1a}}}  + {K_{fst}}{\mkern 1mu} \overline {{U_{1a}}} } \right)}}{{2{\mkern 1mu} \left( {2{\mkern 1mu} {V_{dc0}} - {I_{load}}{\mkern 1mu} {Z_{dcn,s1}} + {C_{dc,s1}}{\mkern 1mu} {V_{dc0}}{\mkern 1mu} {Z_{dcn,s1}}} \right)}}} \\ 
  0&0&0 
\end{array}} \right)
\end{equation}

\begin{equation}
\tilde H = 
\left( {\begin{array}{*{20}{c}}
  { - {K_{m,sn1}}{\mkern 1mu} {V_{dc0}}{\mkern 1mu} \left( {{H_{i,s0}} + {K_{dq}}{\mkern 1mu} i} \right)}&0&0 \\ 
  0&0&0 \\ 
  0&0&{ - {K_{m,s1}}{\mkern 1mu} {V_{dc0}}{\mkern 1mu} \left( {{H_{i,s0}} - {K_{dq}}{\mkern 1mu} i} \right)} 
\end{array}} \right)
\end{equation}
 

 \begin{equation}
\left( {\begin{array}{*{20}{c}}
  {{{\tilde S}_{11}}} \\ 
  {{{\tilde S}_{13}}} \\ 
  {{{\tilde S}_{31}}} \\ 
  {{{\tilde S}_{33}}} 
\end{array}} \right){\text{ = }}\left( {\begin{array}{*{20}{c}}
  {\frac{{{K_{m,sn1}}{\mkern 1mu} {T_{pll,s0}}{\mkern 1mu} {V_{dc0}}{\mkern 1mu} \left( {{M_{1d}} + {H_{i,s0}}{\mkern 1mu} {I_{1d}} + {I_{1d}}{\mkern 1mu} {K_{dq}}{\mkern 1mu} i + {I_{1q}}{\mkern 1mu} {K_{dq}} - {H_{i,s0}}{\mkern 1mu} {I_{1q}}{\mkern 1mu} i - {M_{1q}}{\mkern 1mu} i} \right)}}{2}} \\ 
  { - \frac{{{K_{m,sn1}}{\mkern 1mu} {T_{pll,s0}}{\mkern 1mu} {V_{dc0}}{\mkern 1mu} \left( {{M_{1d}} + {H_{i,s0}}{\mkern 1mu} {I_{1d}} + {I_{1d}}{\mkern 1mu} {K_{dq}}{\mkern 1mu} i + {I_{1q}}{\mkern 1mu} {K_{dq}} - {H_{i,s0}}{\mkern 1mu} {I_{1q}}{\mkern 1mu} i - {M_{1q}}{\mkern 1mu} i} \right)}}{2}} \\ 
  { - \frac{{{K_{m,s1}}{\mkern 1mu} {T_{pll,s0}}{\mkern 1mu} {V_{dc0}}{\mkern 1mu} \left( {{M_{1d}} + {H_{i,s0}}{\mkern 1mu} {I_{1d}} - {I_{1d}}{\mkern 1mu} {K_{dq}}{\mkern 1mu} i + {I_{1q}}{\mkern 1mu} {K_{dq}} + {H_{i,s0}}{\mkern 1mu} {I_{1q}}{\mkern 1mu} i + {M_{1q}}{\mkern 1mu} i} \right)}}{2}} \\ 
  {\frac{{{K_{m,s1}}{\mkern 1mu} {T_{pll,s0}}{\mkern 1mu} {V_{dc0}}{\mkern 1mu} \left( {{M_{1d}} + {H_{i,s0}}{\mkern 1mu} {I_{1d}} - {I_{1d}}{\mkern 1mu} {K_{dq}}{\mkern 1mu} i + {I_{1q}}{\mkern 1mu} {K_{dq}} + {H_{i,s0}}{\mkern 1mu} {I_{1q}}{\mkern 1mu} i + {M_{1q}}{\mkern 1mu} i} \right)}}{2}} 
\end{array}} \right)
 \end{equation}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
\end{document}
